<admintpl file="header" />
</head>
<body>
<div class="wrap">
    <p style="text-align: center;font-size: large">跑客信息查询</p>
    <form class="well form-search" method="post" action="{:U('Bdrunpeople/user_sign_list')}">
        跑客姓名：<input type="text" name="formget[dispatch_name]" style="width: 60px;" value="{$formget.dispatch_name}"><!--  placeholder="请输入..." -->
        电话：<input type="text" name="formget[mobile]" style="width: 85px;" value="{$formget.mobile}"><!--  placeholder="请输入..." -->
        所属团队：
        <select class="select_2" name="formget[company_id]"  style="width: 105px;" >
            <volist name="company_data" id="vo">
                <if condition="$formget.company_id == $vo[company_id]">
                <option value="{$vo.company_id}" selected>{$vo.company_name}</option>
                    <else /><option value="{$vo.company_id}" >{$vo.company_name}</option>
                </if>
            </volist>
        </select>
        是否审核通过：
    </select>
    <select class="select_2" name="formget[is_audit]"  style="width: 110px;" >
        <option value='-1'{$formget[is_audit]==-1?selected:''}>全部</option>
        <option value='0' {$formget[is_audit]==0?selected:''}>未提交申请</option>
        <option value='1' {$formget[is_audit]==1?selected:''}>已提交申请</option>
        <option value='2' {$formget[is_audit]==2?selected:''}>审核通过</option>
        <option value='3' {$formget[is_audit]==3?selected:''}>拒绝通过</option>
    </select>
        是否签约：
        <select class="select_2" name="formget[is_sign]"  style="width: 80px;" >
            <option value='-1' {$formget[is_audit]==-1?selected:''}>全部</option>
            <option value='1'{$formget[is_sign]==1?selected:''}>未签约</option>
            <option value='2' {$formget[is_sign]==2?selected:''}>已签约</option>
            <option value='3' {$formget[is_sign]==3?selected:''}>已解约</option>
        </select>
        账户状态：
        <select class="select_2" name="formget[account_status]"  style="width: 80px;" >
            <option value='0' {$formget[account_status]==0?selected:''}>全部</option>
            <option value='1' {$formget[account_status]==1?selected:''}>正常</option>
            <option value='3' {$formget[account_status]==3?selected:''}>冻结</option>
            <option value='2' {$formget[account_status]==2?selected:''}>停用</option>
        </select>
        签约时间：
        <input type="text" name="formget[start_time]" class="js-date" value="{$formget.start_time|default=''}" style="width: 80px;" autocomplete="off">-
        <input type="text" class="js-date" name="formget[end_time]" value="{$formget.end_time}" style="width: 80px;" autocomplete="off">
        <input type="submit" class="btn btn-primary" value="搜索" />

    </form>
    总数：{$total_count}人
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th align="center">序号</th>
                <th>所属团队</th>
                <th>分公司</th>
                <th>{:L('DISPATCH_NAME')}</th>
                <th>电话</th>
                <th>{:L('DISPATCH_LEVEL')}</th>
                <th>{:L('WORK_STATUS')}</th>
                <th>{:L('ACCOUNT_STATUS')}</th>
                <th>累积时长</th>
                <th>今日时长</th>
                <th align="center">提交资料时间</th>
                <th align="center">审核时间</th>
                <th align="center">签约时间</th>
            </tr>
            </thead>
            <tbody>
            <php>$account_statuses=array("1"=>'正常',"2"=>'停用',"3"=>'临时冻结');
                $signs=array("0"=>'未签约',"1"=>'未签约',"2"=>'已签约',"3"=>'已解约');

            </php>
            <foreach name="lists" item="vo" key="k">
                <tr>

                    <php>$name= urldecode($vo['dispatch_name']);</php>
                    <td align="center">{$k+1}</td>
                    <td>{$vo['company_id']|getCompanyName}</td>
                    <td>{$vo['company_branch']|get_combranch_name}</td>
                    <td>{$name}</td>
                    <td>{$vo['mobile']}</td>
                    <td>{$vo['dispatch_level_id']|getPnLevel}</td>
                    <td>{$vo['work_status']==1?听单中:收工}</td>
                    <td>{$account_statuses[$vo['account_status']]}</td>
                    <td>{$vo['onlinetime']}</td>
                    <td>{$vo['todaytime']}</td>
                    <td>{$vo['mater_submit_time']}</td>
                    <td>{$vo['audit_time']}</td>
                    <td>{$vo['sign_time']}</td>
                </tr>

            </foreach>
            </tbody>
        </table>
        <if condition="empty($lists)">
            <div style="padding: 30px;text-align: center;color: #999999">
                <i class="fa fa-database" style="font-size: 38px"></i><br />
                暂无数据
            </div>
        </if>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    setCookie('refersh_time', 0);
    function refersh_window() {
        var refersh_time = getCookie('refersh_time');
        if (refersh_time == 1) {
            window.location = "{:U('Bdrunpeople/user',$formget)}";
        }
    }
    setInterval(function() {
        refersh_window();
    }, 2000);
    $(function() {
        setCookie("refersh_time", 0);
        Wind.use('ajaxForm', 'artDialog', 'iframeTools', function() {
            //批量移动
            $('.js-articles-move').click(function(e) {
                var str = 0;
                var id = tag = '';
                $("input[name='ids[]']").each(function() {
                    if ($(this).attr('checked')) {
                        str = 1;
                        id += tag + $(this).val();
                        tag = ',';
                    }
                });
                if (str == 0) {
                    art.dialog.through({
                        id : 'error',
                        icon : 'error',
                        content : '您没有勾选信息，无法进行操作！',
                        cancelVal : '关闭',
                        cancel : true
                    });
                    return false;
                }
                var $this = $(this);
            });
        });

    });

    /**
     * 设置跑客的个人可接单量
     */
    function set_pn_rob_order(dispatch_id,order_count) {
        if(order_count==null || order_count=="")
                order_count = 0;
        layer.prompt({title: '原可接单量【'+order_count+'】单，输入新可接单量：', formType: 3}, function(counts, index){
            layer.close(index);

            $.ajax({
                type: "GET",
                async: true,
                url: "{:U('Bdrunpeople/set_pn_rob_order')}",//接单跑客的位置
                data:"id="+dispatch_id+"&counts="+counts,
                dataType: "json",
                success: function(data) {
//                    if(data == 1 )
//                        alert("设置成功");
                            window.location.reload();
//                    else
//                         alert("设置失败");
                }
            });
        });
    }
</script>
</body>
</html>